<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <div id="app">
      <h1>打开 Elements 查看元素的实际变化</h1>
      <h2>一、v-if <button @click="ifToggle = !ifToggle">toggle</button></h2>
      <p v-if="ifToggle">{{title}}</p>
      <h2>二、v-show <button @click="showToggle = !showToggle">toggle</button></h1>
      <p v-show="showToggle">{{title}}</p>
    </div>
    <script src="../packages/vue.min.js"></script>
    <script>
      new Vue({
        data() {
          return {
            title: 'Hello Vue.js',
            ifToggle: true,
            showToggle: true,
          }
        },
      }).$mount('#app')
    </script>
  </body>
</html>
